#include"../log.hpp"

void test_log_level()
{
    INF_LOG("----------------------set log level as debug----------------------\n");
    Log::set_log_level(Log::DEBUG_LOG_LEVEL);
    ERR("*********log error\n");
    WAR("*********log warning\n");
    INF("*********log info\n");
    DBG("*********log debug\n");
    printf("\r\n");

    INF_LOG("----------------------set log level as info----------------------\n");
    Log::set_log_level(Log::INFO_LOG_LEVEL);
    ERR("*********log error\n");
    WAR("*********log warning\n");
    INF("*********log info\n");
    DBG("*********log debug\n");
    printf("\r\n");

    INF_LOG("----------------------set log level as debug----------------------\n");
    Log::set_log_level(Log::WARN_LOG_LEVEL);
    ERR("*********log error\n");
    WAR("*********log warning\n");
    INF("*********log info\n");
    DBG("*********log debug\n");
    printf("\r\n");

    INF_LOG("----------------------set log level as debug----------------------\n");
    Log::set_log_level(Log::ERROR_LOG_LEVEL);
    ERR("*********log error\n");
    WAR("*********log warning\n");
    INF("*********log info\n");
    DBG("*********log debug\n");
    printf("\r\n");
}

int main()
{
    Log::get_instance()->init(nullptr);
    test_log_level();

    return 0;
}